package com.wanxi.pay.controller;

import com.wanxi.pay.domain.Pay;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author:wgy
 * @Data：2022/1/20 9:20
 */
@Controller
@RequestMapping
public class HtmlController {

    @GetMapping("toPay")
    public String html(String subject,String order,String total ,Model model){
        Pay build = Pay.builder()
                .order(order)
                .total(total)
                .subject(subject)
                .build();
        model.addAttribute("dto", build);
        return "pay";
    }

}
